package com.peppa.petshop.controller;


import com.peppa.petshop.service.FavoriteService;
import com.peppa.petshop.vo.FavoriteVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张三
 * @since 2021-06-02
 */
@Controller
@RequestMapping("/user")
public class FavoriteController {
    @Autowired
    private FavoriteService favoriteService;

    @RequestMapping("/myfavor")
    @ResponseBody
    public List<FavoriteVO> getFavorList(HttpServletRequest request){
        Integer customerId = new Integer("2");
        List<FavoriteVO> favoriteVOList = favoriteService.getMyFavor(customerId);
        return favoriteVOList;
    }
}

